qui(
    function (require, exports, module) {
        window.EpgWeb = window.EpgWeb || {
            version: '1.0'
        };
//        business	业务名称	业务代码：PGC，CPP等	Y	string
//        name	服务名称	该服务名称需要和你在监控中所配置的名称一致	Y	string
//        cost	耗时	单位是毫秒	Y	sring	1000
//        sendTime	投递数据的时间戳	投递数据的时间戳（到秒一级）	Y	string	1493258494
//        detail	透传详细信息	想要传递过来的详细信息，如一条完整日志	N	json string
//        serverIp	机器IP地址	产生投递信息的机器IP	Y	string
//        checkToken	接口签名参数	接口签名参数	Y	string
        EpgWeb.PingBackCost = {
            doExecute: function (wrapData, callback) {
                var testUrl = "http://xiu-test-monitor-dev001-cqdx.qiyi.virtual/monitor-api/pingback/cost";
                var onlineUrl = "http://monitor.live.qiyi.domain/monitor-api/pingback/cost";
                var paramsArr = [];
                var retData = wrapData;
                paramsArr.push({keyName: "business", value: "live2vod"});
                paramsArr.push({keyName: "name", value: "zzd_jqh"});
                paramsArr.push({keyName: "cost", value: retData.costTime + ""});
                paramsArr.push({keyName: "sendTime", value: parseInt(new Date().getTime() / 1000 )  })
                paramsArr.push({keyName: "detail", value: retData.detail});
                paramsArr.push({keyName: "serverIp", value: retData.serverIp}) //
                paramsArr.push({keyName: "checkToken", value: md5("business=live2vod|F@(LhCw79plfWd3$83#530")})

                var sendData = {}
                $.each(paramsArr, function (index, element) {
                    if (element.value != null) {
                        sendData[element.keyName] = element.value;
                    }
                })
                var options = {
                    url: auth.dev() ? testUrl : onlineUrl,
                    dataType: 'json',
                    data: sendData,
                    type: "post",
                    success: function (data) {
                        if (callback != null) {
                            callback.call(this, data);
                        }
                    },
                    error: function (data) {
                        if (callback != null) {
                            callback.call(this, data);
                        }
                    }
                }
                EpgWeb.Dao.sendProxy(options)
            },
            doQuickSend: function (wrapData) {
                this.doExecute(wrapData, function (data) {
                    console.log(data);
                })
            },
            doTest: function (enterData) {
                var demo = $.extend({}, enterData, { costTime: 30000, serverIp: "127.0.0.1", detail: JSON.stringify({msg: "demo"})})
                this.doQuickSend(demo)
            }
        }
    }
);